// 字符串转数组
var str = 'as, af,ag';
var arr = str.split(',')
console.log(arr);

// 数组转字符串
var array = [1,2,3,4];
var string = array.join(',');
var to = string.toString()
console.log(to);